﻿

namespace WH.Contracts.Systems.KeyValues
{
    /// <summary>
    /// 
    /// </summary>
    public class KeyValueTreeOutputDto
    {
        /// <summary>
        /// 主键
        /// </summary>
        public string Id { get; set; } = null!;

        /// <summary>
        /// 编号
        /// </summary>
        public string Code { get; set; } = null!;

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; } = null!;

        /// <summary>
        /// 是否可删除（0否 1是）
        /// </summary>
        public bool IsDeletable { get; set; }

        /// <summary>
        /// 是否是叶子节点
        /// </summary>
        public bool IsLeaf { get; set; } = false;


        /// <summary>
        /// 父节点id 默认为0位顶节点
        /// 默认值:
        /// </summary>      
        public string ParentId { get; set; } = null!;

        /// <summary>
        /// 层次 例如 0级 1级 2级 3级 用数字代替
        /// 默认值:
        /// </summary>
        public int Layer { get; set; }

        /// <summary>
        /// 完整链路路径
        /// </summary>
        public string Link { get; set; } = null!;

        /// <summary>
        /// 图标
        /// </summary>
        public string IconUrl { get; set; } = null!;

        /// <summary>
        /// 排序码 数字越小越靠前
        /// </summary>
        public int SortCode { get; set; }

        /// <summary>
        /// 状态（0停用 1正常）
        /// </summary>
        public bool IsEnable { get; set; }

        /// <summary>
        /// 描述/备注说明
        /// </summary>
        public string? Remark { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string? CreatedBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreatedTime { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        public string? UpdatedBy { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdatedTime { get; set; }

        public IList<KeyValueTreeOutputDto>? Children { get; set; }
    }
}
